$(document).ready(function(){
	
	var contextPath = document.location.pathname;
	var index = contextPath.substr(1).indexOf("/");
	contextPath = contextPath.substr(1, index);
	var basePath = "/" + contextPath;
	var validObject = $("#registerPass").Validform({

		dataType:'text',
		tiptype:2,
		ajaxPost:true,
		
		
		usePlugin:{
			passwordstrength:{
				minLen:6,
				maxLen:18
			}
		},
		
		callback:function(data){
			if(data==0){
        		window.location.assign(basePath+"/HRTWEB/register/registerSuccess.jsp");
        	}
        	
        	else{
        		alert("设置密码失败");
        	}
		},
		
		tiptype:function(msg,o,cssctl){
			
			if(!o.obj.is("form")){
				var tds=o.obj.text();
				
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			
				
			}	
			
		}
	
	});
});